Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: apply spotless conditionally #1119

Merged

Conversation

kacperkapusciak
Copy link
Member

Description

Fixes issue mentioned in #1118 with clashing Spotless configuration when developer's app also uses Spotless.

This PR makes spotless only load within react-native-screens project.

Changes

Moved spotless configuration to separate file and load it conditionally using apply from syntax.

Test code and steps to reproduce

init a RN project, add

plugins {
  id "com.diffplug.spotless" version "5.14.1"
}

to build.gradle

yarn add react-native-screens, and try to build.

Checklist

  • Included code example that can be used to test this change
  • Ensured that CI passes

@kacperkapusciak
Copy link
Member Author

@cruzach could you check if this fixes the issue for you?

Also, sorry to bother you @ElviraBurchik but could you check if this doesn't break anything I've recently fixed within your setup?

Copy link
Member

@WoLewicki WoLewicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me 🎉

@cruzach
Copy link
Contributor

cruzach commented Sep 10, 2021

Yes, this fixes the issue I mentioned in my PR, thanks!

@kacperkapusciak kacperkapusciak merged commit 4a38d71 into master Sep 10, 2021
@kacperkapusciak kacperkapusciak deleted the @kacperkapusciak/apply-spotless-conditionally branch September 10, 2021 13:45
@ElviraBurchik
Copy link

Hey @kacperkapusciak 👋 This branch works with our setup. Thank you! 🙌

@cruzach
Copy link
Contributor

cruzach commented Sep 13, 2021

hi @kacperkapusciak, sorry for the ping- do you think this would be published soon or should we revert/patch-package this ourselves for now?

@WoLewicki
Copy link
Member

@cruzach we can release a patch version with this change only if you think it would be better from Expo point of view.

@cruzach
Copy link
Contributor

cruzach commented Sep 13, 2021

Yes please! We'd like to include the newest version in SDK 43, but use spotless ourselves so we'd need this fix

@WoLewicki
Copy link
Member

@cruzach
Copy link
Contributor

cruzach commented Sep 13, 2021

thankyou 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants